home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / program / recode33.zip / MAKEFILE next >
Text File  |  1994-03-15  |  8KB  |  270 lines

  1. # Generated automatically from Makefile.in by configure.
  2. # Makefile for GNU recode.
  3. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  4. # Francois Pinard <pinard@iro.umontreal.ca>, 1988.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. SHELL = /bin/sh
  21.  
  22. srcdir = .
  23. VPATH = .
  24. U = 
  25.  
  26. CC = gcc
  27. AR = ar
  28. RANLIB = ranlib
  29. INSTALL = /c/install -c
  30. INSTALL_DATA = $(INSTALL) -m 644
  31. INSTALL_PROGRAM = $(INSTALL)
  32. MAKEINFO = makeinfo
  33. TEXI2DVI = texi2dvi
  34.  
  35. # GNU awk (or nawk, or mawk) is required for remaking merged.c.
  36. AWK = gawk
  37. # Flex (2.3 or better) is required for remaking merged.c.
  38. LEX = flex
  39.  
  40. # Special values for DEFS:
  41. # -DMSDOS        If you are using Messy-DOS; implies USE_FPUTC.
  42. # -DUSE_FPUTC        If merged.c overflows or thrashes the C compiler.
  43.  
  44. CFLAGS = -g
  45. DEFS = -DHAVE_CONFIG_H
  46. LDFLAGS = -g $(LDEFS)
  47. LDEFS = 
  48. LIBS =  
  49.  
  50. prefix = /usr/local
  51. exec_prefix = $(prefix)
  52. bindir = $(exec_prefix)/bin
  53. infodir = $(prefix)/info
  54.  
  55. CPPFLAGS = -I. -I$(srcdir) $(DEFS)
  56.  
  57. .c.o:
  58.     $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
  59.  
  60. HEADERS = getopt.h pathmax.h recode.h charname.h charset.h
  61. SOURCES = recode.c charname.c $(C_STEPS) $(L_STEPS)
  62. OBJECTS = $Urecode.o $Ucharname.o $(STEPOBJS)
  63. LIBSRCS = alloca.c argmatch.c getopt.c getopt1.c error.c xmalloc.c \
  64. xstrdup.c flexlib.c
  65. LIBOBJS =  argmatch.o getopt.o getopt1.o error.o xmalloc.o \
  66. xstrdup.o  flexlib.o
  67. # Beware that when ` flexlib.o' is empty, the last `\' may be wrong.
  68.  
  69. C_STEPS = charset.c applemac.c atarist.c bangbang.c cdcnos.c \
  70. ebcdic.c flat.c ibmpc.c iconqnx.c lat1asci.c lat1ltex.c \
  71. lat1txte.c nextstep.c
  72.  
  73. L_STEPS = ascilat1.l ltexlat1.l txtelat1.l
  74.  
  75. STEPOBJS = $Ucharset.o $Uapplemac.o $Uatarist.o $Ubangbang.o $Ucdcnos.o \
  76. $Uebcdic.o $Uflat.o $Uibmpc.o $Uiconqnx.o $Ulat1asci.o $Ulat1ltex.o \
  77. $Ulat1txte.o $Unextstep.o $Umerged.o
  78.  
  79. DISTFILES = README HINTS NEWS TODO THANKS COPYING INSTALL ChangeLog \
  80. configure.in acconfig.h aclocal.m4 mkinstalldirs install.sh ansi2knr.c \
  81. Makefile.in mergelex.awk unhexify.l recode.texi texinfo.tex \
  82. $(HEADERS) $(SOURCES) $(LIBSRCS) c-boxes.el checkit \
  83. rfc1345.txt charname.sed charname.pl charset.sed charset.pl \
  84. .stamp-h.in config.h.in configure merged.c charset.texi recode.info
  85.  
  86. # Put aside for now: configdos.pl config.tcc.
  87.  
  88. CHECKTEST = @$(SHELL) $(srcdir)/checkit $(srcdir)/COPYING
  89.  
  90. all: recode
  91.  
  92. recode: .stamp-collect $(OBJECTS) librec.a
  93.     $(CC) $(LDFLAGS) -o recode $(OBJECTS) librec.a $(LIBS)
  94.  
  95. $(srcdir)/merged.c: mergelex.awk $(L_STEPS)
  96.     (cd $(srcdir); $(AWK) -f mergelex.awk $(L_STEPS)) \
  97.     | $(LEX) -t8 | grep -v '^# *line [0-9]' > merged.tmp
  98.     mv merged.tmp $(srcdir)/merged.c
  99.     @rm -f $(srcdir)/merged*.tmp
  100.  
  101. charname.h: charname.sed charname.pl rfc1345.txt
  102.     sed -n -f charname.sed rfc1345.txt | perl charname.pl
  103.  
  104. charset.h charset.texi: charset.sed charset.pl rfc1345.txt
  105.     sed -n -f charset.sed rfc1345.txt | perl charset.pl
  106.  
  107. ansi2knr: ansi2knr.c
  108.     $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ansi2knr $(srcdir)/ansi2knr.c
  109. _recode.c: recode.c ansi2knr
  110.     ./ansi2knr $(srcdir)/recode.c > _recode.c
  111. _charname.c: charname.c ansi2knr
  112.     ./ansi2knr $(srcdir)/charname.c > _charname.c
  113. _charset.c: charset.c ansi2knr
  114.     ./ansi2knr $(srcdir)/charset.c > _charset.c
  115. _applemac.c: applemac.c ansi2knr
  116.     ./ansi2knr $(srcdir)/applemac.c > _applemac.c
  117. _atarist.c: atarist.c ansi2knr
  118.     ./ansi2knr $(srcdir)/atarist.c > _atarist.c
  119. _bangbang.c: bangbang.c ansi2knr
  120.     ./ansi2knr $(srcdir)/bangbang.c > _bangbang.c
  121. _cdcnos.c: cdcnos.c ansi2knr
  122.     ./ansi2knr $(srcdir)/cdcnos.c > _cdcnos.c
  123. _ebcdic.c: ebcdic.c ansi2knr
  124.     ./ansi2knr $(srcdir)/ebcdic.c > _ebcdic.c
  125. _flat.c: flat.c ansi2knr
  126.     ./ansi2knr $(srcdir)/flat.c > _flat.c
  127. _ibmpc.c: ibmpc.c ansi2knr
  128.     ./ansi2knr $(srcdir)/ibmpc.c > _ibmpc.c
  129. _iconqnx.c: iconqnx.c ansi2knr
  130.     ./ansi2knr $(srcdir)/iconqnx.c > _iconqnx.c
  131. _lat1asci.c: lat1asci.c ansi2knr
  132.     ./ansi2knr $(srcdir)/lat1asci.c > _lat1asci.c
  133. _lat1ltex.c: lat1ltex.c ansi2knr
  134.     ./ansi2knr $(srcdir)/lat1ltex.c > _lat1ltex.c
  135. _lat1txte.c: lat1txte.c ansi2knr
  136.     ./ansi2knr $(srcdir)/lat1txte.c > _lat1txte.c
  137. _nextstep.c: nextstep.c ansi2knr
  138.     ./ansi2knr $(srcdir)/nextstep.c > _nextstep.c
  139. _merged.c: merged.c ansi2knr
  140.     ./ansi2knr $(srcdir)/merged.c > _merged.c
  141.  
  142. $(OBJECTS): config.h
  143. $Urecode.o $Ucharname.o $Ucharset.o $(STEPOBJS): recode.h
  144. $Urecode.o: initstep.h
  145. $Ucharname.o: charname.h
  146. $Ucharset.o: charset.h
  147.  
  148. .stamp-collect: charset.h $(C_STEPS) merged.c
  149.     (cd $(srcdir); sed -n 's/^\(module_[^ ]*\).*/  \1 ();/p' \
  150.       charset.h $(C_STEPS) merged.c ) > initstep.tmp
  151.     if cmp -s initstep.h initstep.tmp; then rm initstep.tmp; \
  152.     else mv initstep.tmp initstep.h; fi
  153.     touch .stamp-collect
  154.  
  155. librec.a: $(LIBOBJS)
  156.     rm -f librec.a
  157.     $(AR) cru librec.a $(LIBOBJS)
  158.     $(RANLIB) librec.a
  159.  
  160. $(LIBOBJS): config.h
  161. getopt.o getopt1.o: getopt.h
  162.  
  163. check: recode
  164.     @./recode --version
  165.     $(CHECKTEST) texte texte
  166.     $(CHECKTEST) texte latin1
  167.     $(CHECKTEST) texte ibmpc
  168.     $(CHECKTEST) texte iconqnx
  169.     $(CHECKTEST) texte bangbang
  170.     $(CHECKTEST) ascii-bs ebcdic
  171.     @echo "All checks completed successfully."
  172.  
  173. autocheck:
  174.     @echo "The following test may take part of an hour.  Be patient."
  175.     @(./recode --auto-check | grep UNACH | grep -v '^flat') || exit 0
  176.  
  177. info: recode.info
  178.  
  179. recode.info: recode.texi charset.texi
  180.     $(MAKEINFO) -I$(srcdir) --no-split recode.texi
  181.  
  182. dvi: recode.dvi
  183.  
  184. recode.dvi: recode.texi
  185.     $(TEXI2DVI) $(srcdir)/recode.texi
  186.  
  187. install: recode recode.info installdirs
  188.     $(INSTALL_PROGRAM) recode $(bindir)/recode
  189.     $(INSTALL_DATA) $(srcdir)/recode.info $(infodir)/recode.info
  190.  
  191. # Make sure all installation directories, e.g. $(bindir) actually exist by
  192. # making them if necessary.
  193. installdirs:
  194.     $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(infodir)
  195.  
  196. uninstall: all
  197.     rm -f $(bindir)/recode $(infodir)/recode.info
  198.  
  199. tags: $(HEADERS) $(SOURCES)
  200.     ctags $(HEADERS) $(SOURCES)
  201.  
  202. TAGS: $(HEADERS) $(SOURCES)
  203.     etags -t $(HEADERS) $(SOURCES)
  204.  
  205. texclean:
  206.     rm -f *.aux *.cp *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr
  207.  
  208. mostlyclean: texclean
  209.     rm -f *~ *.tmp core
  210.  
  211. clean: mostlyclean
  212.     rm -f recode unhexify _*.c *.o *.a
  213.  
  214. distclean: clean
  215.     rm -f tags TAGS Makefile config.status config.h ansi2knr
  216.     rm -f initstep.h .stamp-collect
  217.  
  218. realclean: distclean
  219.     rm -f recode.info merged.c charname.h charset.h charset.texi
  220.  
  221. dist: $(DISTFILES)
  222.     @echo "Did you run \`make detecthex' recently?"
  223.     pwd | sed 's|.*/||' > .fname
  224.     rm -rf `cat .fname`
  225.     mkdir `cat .fname`
  226.     chmod 777 `cat .fname`
  227.     ln $(DISTFILES) `cat .fname`
  228.     chmod -R a+r `cat .fname`
  229.     tar chozf `cat .fname`.tar.gz `cat .fname`
  230.     rm -rf `cat .fname` .fname
  231.  
  232. dist.dos: $(DISTFILES)
  233.     rm -rf dist.dos
  234.     rm -f recode.zoo
  235.     mkdir dist.dos
  236.     cp $(DISTFILES) dist.dos
  237.     perl configdos.pl config.tcc > dist.dos/makefile
  238.     echo $(OBJECTS) | tr -s ' ' "\012" | \
  239.       sed 's/\.o$$/.obj/' > dist.dos/objects.lst
  240.     cd dist.dos; chmod +w *; ../recode :ibmpc *; zoo ahq ../recode *
  241.     rm -rf dist.dos
  242.  
  243. # Once in a while, find ramping octal or hexadecimal!
  244. detecthex: unhexify
  245.     PATH=`pwd`:$(PATH); cd $(srcdir); \
  246.     for file in $(HEADERS) $(SOURCES); do \
  247.       unhexify $$file | diff -u $$file -; \
  248.     done
  249.  
  250. unhexify: unhexify.l
  251.     $(LEX) $(srcdir)/unhexify.l
  252.     $(CC) $(LDFLAGS) -o unhexify lex.yy.c $(LIBS)
  253.     rm -f lex.yy.c
  254.  
  255. # The next rule also takes care of making config.h from config.h.in.
  256. # If remaking config.h does not change it, its timestamp is untouched.
  257. Makefile: Makefile.in config.status .stamp-h.in
  258.     $(SHELL) config.status
  259. config.status: configure
  260.     $(SHELL) config.status --recheck
  261. configure: configure.in aclocal.m4
  262.     cd $(srcdir); autoconf
  263. .stamp-h.in: configure.in aclocal.m4 acconfig.h
  264.     cd $(srcdir); autoheader
  265.     touch $(srcdir)/.stamp-h.in
  266.  
  267. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  268. # Otherwise a system limit (for SysV at least) may be exceeded.
  269. .NOEXPORT:
  270.